﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@model sipfe.model.dataAccess.SIPMaePersona
@using Resources;
@using sipfe.util;
@{   
    Layout = "~/Views/Shared/Layaout/general/_LayoutPopGeneral.cshtml";    
}
<script type="text/javascript">
    $(function () {         
        calendarioFechaNac('dtFecNacim');
        calendarioFechaNac('dFecFalle');        
    });
</script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.mantePersonaJS)"></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.ajaxJS)"></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.nuevoJS)" ></script>
@using (Html.BeginForm("UpdateDatosPersonaInp", "MantePerson", FormMethod.Post))
{
    @Html.ValidationSummary(false, "Los Siguientes Campos son Obligatorios:")
    @Html.HiddenFor(model => model.nIdePersona)
    @Html.HiddenFor(model => model.nIdeTipoPer)
    @Html.HiddenFor(model => model.nIdeUsuReg)
    @Html.HiddenFor(model => model.dtFecReg)
    @Html.HiddenFor(model => model.dFecIniVig)
    @Html.Hidden("swReg",0)    
<fieldset style="width: 760px;" class="fieldsetStyle1">
    <legend class="tituloBlue9">Actualizar Datos de la Persona Natural</legend>
    <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0">
        <tbody>
            <tr>                
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tbody class="tituloCelesteN8">
                        <tr>
                            <td>País Emisor<span class="asterisco">(*)</span></td>
                            <td>Tipo documento<span class="asterisco">(*)</span></td>
                            <td>Número documento<span class="asterisco">(*)</span></td>                            
                            <td>Fecha Nacimiento<span class="asterisco">(*)</span></td>
                            <td>Género<span class="asterisco">(*)</span></td>
                        </tr>                   
                        <tr>
                            <td>@Html.DropDownListFor(model => model.nIdeCodPaisDoc, (IEnumerable<SelectListItem>)ViewBag.PaisEmisor, "--Seleccione--", new { @class = "select8", style = "width:127px;" })</td>
                            <td>@Html.DropDownListFor(model => model.nIdeTipoDocum, (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--", new { @class = "select8", style = "width:127px;" })</td>
                            <td>@Html.TextBoxFor(model => model.vNumDocum, new { @class = "textBoxMay", style = "width:120px;text-transform:none;", maxlength = 20, onkeypress = "return validaAlfaNumTamanio(this,event,20);", onpaste = "return false;", onblur = "javascript:onBlurUpper(this); javascript:validaDocumentoPersona(this,'2','1');" })</td>
                            <td>@Html.TextBoxFor(model => model.dtFecNacim, new { maxlength = 10, readOnly = true, @Value = String.Format("{0:dd/MM/yyyy}", Model.dtFecNacim) })</td>
                            <td>@Html.DropDownListFor(model => model.nIdeTipoGenero, (IEnumerable<SelectListItem>)ViewBag.Genero, "--Seleccione--", new { @class = "select8", style = "width:127px;" })</td>                            
                        </tr>
                        <tr>
                            <td>Primer nombre<span class="asterisco">(*)</span></td>
                            <td>Segundo nombre</td>
                            <td>Apellido paterno<span class="asterisco">(*)</span></td>
                            <td>Apellido materno<span class="asterisco">(*)</span></td>
                            <td>Fecha Fallecimiento</td>
                        </tr>
                        <tr>
                            <td>@Html.TextBoxFor(model => model.vPriNombre, new { style = "width:124px;", maxlength = 120, onblur = "javascript:onBlurUpper(this);" })</td>
                            <td>@Html.TextBoxFor(model => model.vSegNombre, new { style = "width:124px;", maxlength = 120, onblur = "javascript:onBlurUpper(this);" })</td>
                            <td>@Html.TextBoxFor(model => model.vPriApellido, new { style = "width:120px;", maxlength = 120, onblur = "javascript:onBlurUpper(this);" })</td>
                            <td>@Html.TextBoxFor(model => model.vSegApellido, new { style = "width:120px;", maxlength = 120, onblur = "javascript:onBlurUpper(this);" })</td>
                            <td>@Html.TextBoxFor(model => model.dFecFalle, new { maxlength = 10, readOnly = true, @Value = String.Format("{0:dd/MM/yyyy}", Model.dFecFalle) })</td>
                        </tr>
                        <tr>
                            <td>País nacimiento<span class="asterisco">(*)</span></td>
                            <td>Región nacimiento</td>
                            <td colspan="3" rowspan="2">
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                    <tr class="tituloCelesteN8">
                                        <td>Provincia</td>
                                        <td>Distrito</td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div id="divProvinciasNac">
                                                <select id="nIdeProvNac" name="nIdeProvNac" style="width:200px;" >
                                                    <option value="@Model.nIdeProvNac">@(Model.SIPDetCompendio6 != null ? Model.SIPDetCompendio6.vNomCorto : "- - -")</option>
                                                </select>
                                            </div>
                                        </td>
                                        <td>
                                            <div id="divDistritosNac">
                                                <select id="nIdeDistritoNac" name="nIdeDistritoNac" style="width:200px;" >
                                                    <option value="@Model.nIdeDistritoNac">@(Model.SIPDetCompendio7 != null ? Model.SIPDetCompendio7.vNomCorto : "- - -")</option>
                                                </select>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </td>                           
                        </tr>
                        <tr>
                            <td>@Html.DropDownListFor(model => model.nIdePaisNac, (IEnumerable<SelectListItem>)ViewBag.PaisEmisor, "--Seleccione--", new { @class = "select8", style = "width:127px;" })</td>
                            <td>@Html.DropDownListFor(model => model.nIdeRegionNac, (IEnumerable<SelectListItem>)ViewBag.Regiones, "--Seleccione--", new { @class = "select8", style = "width:127px;", onchange = "javascript:cargaUbigeo(this,'1');" })</td>                                                       
                        </tr>
                        <tr>
                            <td>Número de RUC</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                        </tr>
                        <tr>
                            <td>@Html.TextBoxFor(model => model.vNumRuc, new { style = "width:124px;", maxlength = 120, onblur = "javascript:onBlurUpper(this);" })</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                        </tr>
                    </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
</fieldset>
    <table border="0" cellpadding="10" cellspacing="0" style="width:80%;">
        <tr align="center">
            <td width="30%"><b>Campo Obligatorio:</b>&nbsp;<span class="asterisco">(*)</span></td>
            <td width="70%"><input type="button" value="Registrar Datos" onclick="javascript: addPersonaNaturalPopFinal1(this.form);" /></td>
        </tr>
    </table>
}